package com.example.okhttpstudy;

public class TestHttp {

    public static<T, M> void sendJsonRequest(String url, T requestData, Class<M> response, IJsonDataTransformListener listener) {
        IHttpRequest httpRequest = new JsonHttpRequest();
        CallbackListener callbackListener = new JsonCallbackListener<>(response, listener);
        HttpTask ht = new HttpTask(url, requestData, httpRequest, callbackListener);
        ThreadPoolManager.getInstance().addTask(ht);
    }
}
